<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Prepare and execute an SQL statement</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.odbc-exec" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">odbc_exec</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">odbc_exec</span> &mdash; <span class="dc-title">Prepare and execute an SQL statement</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.odbc-exec-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>odbc_exec</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$connection_id</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$query_string</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code></span>
  ] ) : <span class="type">resource</span></div>

  <p class="para rdfs-comment">
   Sends an SQL statement to the database server.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.odbc-exec-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">connection_id</code></dt>

     <dd>

      <p class="para">ODBC 连接标识符，详见
<span class="function"><a href="odbc_connect.html" class="function">odbc_connect()</a></span>。</p>
     </dd>

    
    
     <dt>
<code class="parameter">query_string</code></dt>

     <dd>

      <p class="para">
       The SQL statement.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">flags</code></dt>

     <dd>

      <p class="para">
       This parameter is currently not used.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.odbc-exec-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns an ODBC result identifier if the SQL command was executed
   successfully, or <strong><code>FALSE</code></strong> on error.
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.odbc-exec-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="odbc_prepare.html" class="function" rel="rdfs-seeAlso">odbc_prepare()</a> - Prepares a statement for execution</span></li>
    <li class="member"><span class="function"><a href="odbc_execute.html" class="function" rel="rdfs-seeAlso">odbc_execute()</a> - Execute a prepared statement</span></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>